[USER (data scientist)]: Thanks! Now, how about the number of affordable townhouses and units sold? Please generate a summary of the count of affordable townhouses and units sold, stored as integers, from the 'melbourne_housing' DataFrame.
My template of code snippet is:

---BEGIN CODE TEMPLATE---

import pandas as pd
import pickle

melbourne_housing = pd.read_csv("melb_data.csv") 

# YOUR SOLUTION BEGIN:
<code1>
[GENERATE YOUR CODE]
</code1>
# YOUR SOLUTION END:

print(number_of_affordable_townhouses)

# save data
pickle.dump(number_of_affordable_townhouses,open("./pred_result/number_of_affordable_townhouses.pkl","wb"))

print(number_of_affordable_units)

# save data
pickle.dump(number_of_affordable_units,open("./pred_result/number_of_affordable_units.pkl","wb"))

---END CODE TEMPLATE---

[YOU (AI assistant)]: Sure, here's how you can calculate the number of affordable townhouses and units sold in the past 5 years: 
